package com.demo.login.dao.impl;

import com.demo.login.dao.UserDao;
import com.demo.login.entity.User;

public class UserDaoImpl implements UserDao {

    @Override
    public User login(String loginId, String loginPwd) {
        User user = null;
        if ("admin".equals(loginId)) {
            if ("123456".equals(loginPwd)) {
                user = new User();
                user.setLoginId("admin");
                user.setLoginPwd("123456");
                user.setName("admin");

                return user;
            }
        }
        return null;
    }
}
